﻿<!--
//*****************************************************************************
//
//  Silver Games - Checkers
//  Copyright © 2009 Randi Relander
//      <rjrelander@users.sourceforge.net>
//
//  This program is free software: you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation, either version 3 of the License, or
//  (at your option) any later version.
//
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//
//  You should have received a copy of the GNU General Public License
//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
//
//*****************************************************************************
-->

<UserControl x:Class="Checkers.Client.DialogNewGame"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:c="clr-namespace:Checkers.Client">
	<UserControl.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="CheckersResources.xaml"/>
			</ResourceDictionary.MergedDictionaries>
		</ResourceDictionary>
	</UserControl.Resources>

    <Grid x:Name="LayoutRoot" Background="Transparent">

        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <Rectangle Grid.ColumnSpan="3" Grid.RowSpan="3" x:Name="mBackground" Stroke="#FF40FF00" Width="640" Height="480" StrokeThickness="0" RadiusX="12" RadiusY="12">
            <Rectangle.Fill>
                <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                    <GradientStop Color="#FF000000" Offset="0"/>
                    <GradientStop Color="#FF30C000" Offset="1"/>
                </LinearGradientBrush>
            </Rectangle.Fill>
        </Rectangle>

        <Grid Grid.Row="1" Grid.Column="1">

            <Rectangle RadiusX="12" RadiusY="12" Stroke="Lime" StrokeThickness="2">
                <Rectangle.Fill>
                    <SolidColorBrush Color="Black" Opacity="0.9" />
                </Rectangle.Fill>
            </Rectangle>

            <StackPanel>

                <TextBlock Text="New Game" HorizontalAlignment="Center" Foreground="White" FontWeight="Bold" FontFamily="Verdana" FontSize="18" Margin="10,10,10,0"/>

                <TextBlock Text="Select Players ..." HorizontalAlignment="Left" Foreground="White" FontWeight="Bold" FontFamily="Verdana" FontSize="12" Margin="25,15,0,0"/>

                <StackPanel Margin="10" Orientation="Horizontal">

                    <StackPanel Margin="15">

                        <c:CheckerRed Margin="10,10,0,20" HorizontalAlignment="Center">
                            <c:CheckerRed.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform ScaleX="0.5" ScaleY="0.5" />
                                </TransformGroup>
                            </c:CheckerRed.RenderTransform>
                        </c:CheckerRed>

                        <RadioButton x:Name="mRedHuman" Content="Human" Foreground="White" IsChecked="True" FontFamily="Verdana"/>
                        <RadioButton x:Name="mRedComputer" Content="Computer" Foreground="White" FontFamily="Verdana"/>

                    </StackPanel>

                    <StackPanel Margin="15">

                        <c:CheckerBlack Margin="10,10,0,20" HorizontalAlignment="Center">
                            <c:CheckerBlack.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform ScaleX="0.5" ScaleY="0.5" />
                                </TransformGroup>
                            </c:CheckerBlack.RenderTransform>
                        </c:CheckerBlack>

                        <RadioButton x:Name="mBlackHuman" Content="Human" Foreground="White" FontFamily="Verdana"/>
                        <RadioButton x:Name="mBlackComputer" Content="Computer" Foreground="White" IsChecked="True" FontFamily="Verdana"/>

                    </StackPanel>

                </StackPanel>

                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,0,0,20">
                    <Button Margin="0,0,10,0" Style="{StaticResource ButtonStyle}" FontFamily="Verdana" Width="70" x:Name="mOkButton" Content="OK" />
                    <Button Style="{StaticResource ButtonStyle}" FontFamily="Verdana" Width="70" x:Name="mCancelButton" Content="Cancel" />
                </StackPanel>

            </StackPanel>

        </Grid>

        <Grid.Resources>

            <Storyboard x:Name="mForceFadeInAnimation">
                <DoubleAnimation Storyboard.TargetName="LayoutRoot"
                    Storyboard.TargetProperty="Opacity" From="1" To="1" Duration="0" />
            </Storyboard>

            <Storyboard x:Name="mFadeInAnimation">
                <DoubleAnimation Storyboard.TargetName="LayoutRoot"
                    Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:0.25" />
            </Storyboard>

            <Storyboard x:Name="mFadeOutAnimation">
                <DoubleAnimation Storyboard.TargetName="LayoutRoot"
                    Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:0.25" />
            </Storyboard>

        </Grid.Resources>

    </Grid>

</UserControl>
